var startTime=echartUtil.GetDateStr(-3);
var endTime=echartUtil.GetDateStr(0);
var baseUrl="/weixin/";
//相关业务逻辑
$(function(){
	page.bindTag();
	page.getCreateOrderCompanyData(startTime,endTime);
	$("#startTime").val(startTime);
	$("#endTime").val(endTime);
});

var page={//页面总变量 
		//绑定页面元素
		bindTag:function(){
			$("#querryReportBtn").bind("click",function(){
				var startTime=$("#startTime").val();
				var endTime=$("#endTime").val();
				page.getCreateOrderCompanyData(startTime,endTime);
			});
		},
		getCreateOrderCompanyData:function(startTime,endTime){
			ajaxUtil.ajaxRuquestNoQuan(baseUrl+"workshop/getCreateOrderCompanyData",{"startTime":startTime,"endTime":endTime},function(data){
				var html="";
				for(var i=0;i<data.length;i++){
					html+="<tr>" +
					        "<td style='max-width:100px;'>"+data[i].company+"</td>" +
							"<td style='max-width:40px;'>"+data[i].reportTime.substring(5,data[i].reportTime.length)+"</td>" +
							"<td style='max-width:20px;'>"+data[i].orderCount+"</td>" +
						  "</tr>";
				}
				$("#reportTable").html(html);
			});
		}
}